package middle

type qualifiedEnum = string

type qualifiedStruct struct {
	NONE        qualifiedEnum
	QUALIFIED   qualifiedEnum
	UNQUALIFIED qualifiedEnum
}

//扫码机位置编号枚举
var QualifiedEnum = &qualifiedStruct{
	NONE:        "AGV_NOT_IN",
	QUALIFIED:   "AGV_IN",
	UNQUALIFIED: "UNQUALIFIED",
}

var qualifiedMap = map[qualifiedEnum]string{
	QualifiedEnum.NONE:        "无效",
	QualifiedEnum.QUALIFIED:   "合格",
	QualifiedEnum.UNQUALIFIED: "不合格",
}

// 获取扫码机位置编号枚举中文描述
func GetQualifiedDesc(code qualifiedEnum) string {
	if cb, ok := qualifiedMap[code]; ok {
		return cb
	}
	return "未知类型"
}
